import axios from './http'

export function add(goodsInfo) {
    return axios.post('/goods/add', goodsInfo)
}

export function deleteGoods(id){
    return axios.post('/goods/delete',{id})
}

export function updateStatus(id,status){
    return axios({
        url:'/goods/updateStatus',
        method:POST,
        data:{
            id:id,
            status:status
        }
    })
}

export function queryGoods(goodsName,goodsType,brandName,status) {
    return axios.get('/goods/query'+'?goodsName='+goodsName+'&goodsType='+goodsType+'&brand='+brandName+'&status='+status)
}

export function getGoodsList() {
    return axios.get('/goods/queryGoodsUnitInfo')
}